package com.goods.controller.business;

import com.goods.business.service.InStockService;
import com.goods.common.model.business.InStock;
import com.goods.common.response.ResponseBean;
import com.goods.common.vo.business.InStockVO;
import com.goods.common.vo.system.PageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/business/inStock")
public class InStockController {

    @Autowired
    private InStockService inStockService;


    /**
     *  入库单（入库记录）数据分页列表展示
     * @return
     */
    //findInStockList?pageNum=1&pageSize=10&status=0
    @GetMapping("findInStockList")
    public ResponseBean findInStockList(){
        try {
            PageVO<InStockVO> pageVO = inStockService.findInStockList();
            return ResponseBean.success(pageVO);
        } catch (Exception e) {
            e.printStackTrace();
            return ResponseBean.error("查询失败");
        }
    }

}
